package com.kefu.exam.vo;

import javax.validation.constraints.Size;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.kefu.common.context.KefuContext;
import com.kefu.common.vo.AbstractUpdateVo;
import com.kefu.exam.model.ExamPaperSubject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * @author xy
 * @date 2022/02/28
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@ApiModel(description = "")
public class ExamPaperSubjectUpdateVo extends AbstractUpdateVo<ExamPaperSubject,Long> {
    @NotNull
    @ApiModelProperty(value = "主键")
    private String id;

    @ApiModelProperty(value = "试卷中的分数")
    private Integer point;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @Size(max = 32)
    @ApiModelProperty(value = "试卷ID")
    private String paperId;

    @Size(max = 32)
    @ApiModelProperty(value = "试题ID")
    private String subjectId;

    @Size(max = 32)
    @ApiModelProperty(value = "试题版本ID")
    private String versionId;

    @Override
    public ExamPaperSubject convert() {
        ExamPaperSubject info = new ExamPaperSubject();
        info.setPoint(point);
        info.setSort(sort);
        info.setPaperId(paperId);
        info.setSubjectId(subjectId);
        info.setId(id);
        return info;
	}
}